-
Notifications
You must be signed in to change notification settings - Fork 525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
usapears: implement redundant-nutrient-value filtering #1294
usapears: implement redundant-nutrient-value filtering #1294
Conversation
…changing its behaviour, yet)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just the small addition & everything looks good to go!
Co-authored-by: Joey <7505194+jknndy@users.noreply.github.com>
Thanks @jknndy! |
def nutrients(self): | ||
container = self.soup.find("ul", {"itemprop": "nutrition"}) | ||
if not container: | ||
raise ElementNotFoundInHtml("Could not find nutritional info container") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I'll merge this as-is, but a note about something I realized while self-reviewing my changes: we're a bit inconsistent throughout the codebase about usage of the arguments to the ElementNotFoundInHtml
initializer, and what their purpose is. There might be an opportunity to improve the consistency/functionality there in future.
Resolves #1289.